/*
 * @lc app=leetcode id=9 lang=java
 *
 * [9] Palindrome Number
 */

// @lc code=start
class Solution {
    public boolean isPalindrome(int x) {
        Integer num = x;
        String str = num.toString();
        int left = 0, right = str.length() - 1;
        while(left<=right)
        {
            if (str.charAt(left) != str.charAt(right)) {
                return false;
            }
            left++;
            right--;
        }
        return true;
    }
}
// @lc code=end
// Given an integer x, return true if x is a palindrome, and false otherwise.
